SELECT 'Table',s.index_id,i.name, user_lookups,user_scans,user_seeks, user_updates,  
user_lookups+user_scans+user_seeks-user_updates as diff,                           
case when user_updates =0 then NULL else (user_lookups+user_scans+user_seeks)/(user_updates*1.0) end UseRel,
case when (user_lookups+user_scans+user_seeks) =0 then NULL
 else (user_updates*1.0)/(user_lookups+user_scans+user_seeks) end UpdRel,
left(indcol.ind_col,len(indcol.ind_col)-1) [index_columns],
ISNULL(left(includedcol.ind_col,len(includedcol.ind_col)-1),'') included_columns,
s.system_lookups,s.system_scans,s.system_seeks, s.system_updates, i.is_disabled
from sys.dm_db_index_usage_stats s
inner join sys.indexes i on s.index_id=i.index_id and i.object_id=object_id('PB_uvp_pay_Detail_Archive')
 outer apply  (select  cast(c.name as varchar(100))+','
 from sys.index_columns ci --where ci.index_id=i.index_id and ci.object_id=i.object_id
 inner join sys.columns c on ci.object_id=c.object_id and ci.column_id=c.column_id
 where ci.index_id=i.index_id and ci.object_id=i.object_id and is_included_column=0
 order by index_column_id
 for xml path('') ) indcol(ind_col)
  outer apply  (select  cast(c.name as varchar(100))+','
 from sys.index_columns ci --where ci.index_id=i.index_id and ci.object_id=i.object_id
 inner join sys.columns c on ci.object_id=c.object_id and ci.column_id=c.column_id
 where ci.index_id=i.index_id and ci.object_id=i.object_id and is_included_column=1
 order by index_column_id
 for xml path('') ) includedcol(ind_col)
  where s.database_id=db_id('DB')
 and s.object_id=object_id('Table')
 order by Userel,i.name  
exec sp_spaceused Table  